﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class cameraMovement : MonoBehaviour
{
    [SerializeField] float speed = 10;
    public GameObject Dog;
    public int  limitRange2;
    void Update()
    {
        if(this.transform.position.x<limitRange2)
        {
            if (Dog.transform.position.x >= -4.5f) 
            {
                this.transform.position = new Vector3(Dog.transform.position.x, 0, -10);
            }
            
        }
        
    }
}
